import 'osc_author.dart';

class OscCommentResultEntity {
	int replyCount;
	int star;
	OscAuthor author;
	int voteState;
	bool best;
	int id;
	int viewCount;
	String pubDate;
	int vote;
	String content;
	int appClient;

	OscCommentResultEntity({this.replyCount, this.star, this.author, this.voteState, this.best, this.id, this.viewCount, this.pubDate, this.vote, this.content, this.appClient});

	OscCommentResultEntity.fromJson(Map<String, dynamic> json) {
		replyCount = json['replyCount'];
		star = json['star'];
		author = json['author'] != null ? new OscAuthor.fromJson(json['author']) : null;
		voteState = json['voteState'];
		best = json['best'];
		id = json['id'];
		viewCount = json['viewCount'];
		pubDate = json['pubDate'];
		vote = json['vote'];
		content = json['content'];
		appClient = json['appClient'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['replyCount'] = this.replyCount;
		data['star'] = this.star;
		if (this.author != null) {
      data['author'] = this.author.toJson();
    }
		data['voteState'] = this.voteState;
		data['best'] = this.best;
		data['id'] = this.id;
		data['viewCount'] = this.viewCount;
		data['pubDate'] = this.pubDate;
		data['vote'] = this.vote;
		data['content'] = this.content;
		data['appClient'] = this.appClient;
		return data;
	}
}

class OscProjectCommentResultAuthor {
	OscProjectCommentResultAuthorIdentity identity;
	String name;
	int id;
	String portrait;
	int relation;

	OscProjectCommentResultAuthor({this.identity, this.name, this.id, this.portrait, this.relation});

	OscProjectCommentResultAuthor.fromJson(Map<String, dynamic> json) {
		identity = json['identity'] != null ? new OscProjectCommentResultAuthorIdentity.fromJson(json['identity']) : null;
		name = json['name'];
		id = json['id'];
		portrait = json['portrait'];
		relation = json['relation'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		if (this.identity != null) {
      data['identity'] = this.identity.toJson();
    }
		data['name'] = this.name;
		data['id'] = this.id;
		data['portrait'] = this.portrait;
		data['relation'] = this.relation;
		return data;
	}
}

class OscProjectCommentResultAuthorIdentity {
	bool officialMember;
	bool tenthAnniversary;
	bool softwareAuthor;

	OscProjectCommentResultAuthorIdentity({this.officialMember, this.tenthAnniversary, this.softwareAuthor});

	OscProjectCommentResultAuthorIdentity.fromJson(Map<String, dynamic> json) {
		officialMember = json['officialMember'];
		tenthAnniversary = json['tenthAnniversary'];
		softwareAuthor = json['softwareAuthor'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['officialMember'] = this.officialMember;
		data['tenthAnniversary'] = this.tenthAnniversary;
		data['softwareAuthor'] = this.softwareAuthor;
		return data;
	}
}
